:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #10b981;
    --light-bg: #f9fafb;
    --light-card: #ffffff;
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --text-dark: #1e293b;
    --text-light: #f8fafc;
    --border-radius: 1rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-mode {
    --bg-color: var(--light-bg);
    --card-bg: var(--light-card);
    --text-color: var(--text-dark);
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

.dark-mode {
    --bg-color: var(--dark-bg);
    --card-bg: var(--dark-card);
    --text-color: var(--text-light);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

body {
    background: linear-gradient(135deg, var(--bg-color) 0%, #dadde2 100%);
    color: var(--text-color);
    transition: var(--transition);
    font-family: 'Noto Sans SC', sans-serif;
    background-attachment: fixed;
}

.navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.dark-mode .navbar {
    background: rgba(15, 23, 42, 0.85) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card {
    background: var(--card-bg);
    transition: var(--transition);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 25px -5px var(--shadow-color);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    z-index: 0;
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px var(--shadow-color);
}

.card:hover::before {
    opacity: 1;
}

.thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.thumbnail:hover {
    transform: scale(1.08);
}

.category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover .card-title {
    color: var(--primary-color);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-top: auto;
}

.card-meta .date {
    font-weight: 500;
}

.card-meta .models {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.loading-animation {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.scroll-indicator {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    z-index: 50;
    background: var(--primary-color);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    animation: bounce 2s infinite;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.scroll-indicator:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-12px);
    }

    60% {
        transform: translateY(-6px);
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 模态框样式 */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    background: #eee;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
}

.modal-close {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

/* 添加复制按钮样式 */
.copy-btn {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.copy-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.modal-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.modal-image-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 40px -15px var(--shadow-color);
    position: relative;
}

.modal-image {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.modal-image:hover {
    transform: scale(1.02);
}

.info-section {
    margin-bottom: 1.5rem;
}

.info-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.info-item {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
}

.info-label {
    font-weight: 300;
    min-width: 80px;
    color: var(--text-color);
    opacity: 0.9;
}

.info-value {
    flex: 1;
    color: var(--text-color);
    line-height: 1.6;
}

.model-item {
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.model-item:hover {
    transform: translateX(5px);
    background: rgba(99, 102, 241, 0.15);
}

.prompt-text {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--accent-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.7;
    font-size: 0.95rem;
    transition: var(--transition);
}

.prompt-text:hover {
    background: rgba(16, 185, 129, 0.15);
}

/* 转换工具面板 */
.convert-panel {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px -10px var(--shadow-color);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.convert-panel:hover {
    box-shadow: 0 20px 45px -15px var(--shadow-color);
}

.convert-header {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.25rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.convert-content {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.range-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.range-slider {
    flex: 1;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.progress-container {
    margin-top: 1.5rem;
    display: none;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 9999px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* 类别按钮 */
.category-btn {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
}

.category-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.category-btn:not(.active) {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.category-btn:not(.active):hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 加载更多按钮 */
.load-more-btn {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    transition: var(--transition);
}

.load-more-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* 主题切换按钮 */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    transform: rotate(15deg);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 1.5rem;
    }

    .modal-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .thumbnail-container {
        aspect-ratio: 3/4;
    }
}

@media (max-width: 640px) {
    .btn-group {
        flex-direction: column;
    }

    .modal-title {
        font-size: 1.5rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}